home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17759 < prev    next >
Encoding:
Text File  |  1996-08-05  |  820 b   |  43 lines

  1. Path: news.flex.com.au!news
  2. From: cobweb@flex.com.au (Tony L)
  3. Newsgroups: comp.lang.c++
  4. Subject: main()
  5. Date: Wed, 17 Apr 1996 10:38:28 GMT
  6. Organization: MAD
  7. Message-ID: <3174c0dc.7652220@news.flex.com.au>
  8. NNTP-Posting-Host: slip1-3.flex.com.au
  9. X-Newsreader: Forte Agent .99d/32.182
  10.  
  11. Hi all,
  12.  
  13. I have come across two different ways that 2 different beginners books
  14. recommend that every program should start.  Could someone please tell
  15. me which one is the "BEST" or proper way?
  16.  
  17. #include <stdio.h>
  18. void main()
  19. {
  20.     printf("Hello!\n");
  21.     return 0;
  22. }
  23.  
  24. Or, the same as above but not include "void":
  25.  
  26. #include <stdio.h>
  27. main()
  28. {
  29.     printf("Hello!\n");
  30.     return 0;
  31. }
  32.  
  33. As I am  just really starting out in "C", I'd like to get off to the
  34. right way.  :-)
  35.  
  36. Thank you very much for your time....
  37.  
  38. Regards,
  39. TonyL....
  40.  
  41. cobweb@flex.com.au
  42.  
  43.